import Loading from "./Loading";
import Vue from "vue";

const LoadingConstructor = Vue.extend(Loading)

const LoadingVue = () =>{
    const LoadingInstance = new LoadingConstructor();
    LoadingInstance.$mount(document.createElement("div"))
    document.body.appendChild(LoadingInstance.$el);
    Vue.nextTick(()=>{
        LoadingInstance.isShow=true;
        setTimeout(() => {
            LoadingInstance.close();
        }, 2000);
    })
    return LoadingInstance;
}
export default LoadingVue;